package dynamicloader.windy.com.dynamicloader;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

public class MainActivity extends Activity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        findViewById(R.id.dynamic_loader).setOnClickListener(this);
        findViewById(R.id.dynamic_encrypt).setOnClickListener(this);
        findViewById(R.id.dynamic_plug).setOnClickListener(this);
        findViewById(R.id.hot_patch).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.dynamic_loader: {
                Intent i = new Intent(this, DynamicLoaderActivity.class);
                startActivity(i);
            }
                break;

            case R.id.dynamic_encrypt: {
                Intent i = new Intent(this, DynamicEncryptActivity.class);
                startActivity(i);
            }
                break;

            case R.id.dynamic_plug: {
                Intent i = new Intent(this, DynamicPlugActivity.class);
                startActivity(i);
            }
                break;

            case R.id.hot_patch: {
                Intent i = new Intent(this, HotPatchActivity.class);
                startActivity(i);
            }
                break;
        }
    }
}
